package com.example.order.api.fallback;

import com.example.order.api.StockFeignService;
import com.example.order.common.R;
import com.example.order.pojo.Stock;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author JFeng
 * @Date 2024/5/18
 */
@Component
public class StockFeignServiceFallback implements StockFeignService {
    @Override
    public R<Stock> reduce(Integer quantity) {
        R<Stock> r = new R<>();
        r.error(null, "order服务对stock服务reduce接口的熔断降级处理");
        return r;
    }
}
